//
//  LSHTTPManager.h
//  ZLFastDoctor
//
//  Created by 李宗帅 on 16/5/21.
//  Copyright © 2016年 LS. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef NS_ENUM(NSInteger , LSHTTPManagerType) {
    LSHTTPManagerTypePost,
    LSHTTPManagerTypeGet
};



@interface LSHTTPManager : AFHTTPSessionManager

@property(nonatomic, strong) NSArray * model;



+ (instancetype)sharedManager;

/**
 *  GET请求
 *
 *  @param path            拼接的路径
 *  @param parameters      参数
 *  @param comletionHandle 完毕后的回调
 */
- (void)GET:(NSString *)path parameters:(id)parameters comletionHandle:(void(^)(id responseObject, NSError *error))comletionHandle;

/**
 *  POST请求从写
 *
 *  @param path            拼接的路径
 *  @param parameters      参数
 *  @param comletionHandle 完毕后的回调
 */
- (void)POST:(NSString *)path parameters:(id)parameters comletionHandle:(void(^)(id responseObject,NSError *error))comletionHandle;

- (void)concernDoctor:(void(^)(NSArray * arr1))block;

- (void)requestWithType:(LSHTTPManagerType)type URLString: (NSString *)URLString parameters:(id)parameters success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nonnull, NSError * _Nullable))failure;

- (void)requestWithType:(LSHTTPManagerType)type URLString: (NSString *)URLString parameters:(id)parameters progress:(void (^)(NSProgress * _Nonnull))downloadProgress success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nonnull, NSError * _Nullable))failure;


@end
